import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsOptional } from 'class-validator';

export class WxLoginRequestDto {
  @ApiProperty({ description: '微信登录code' })
  @IsString()
  code: string;

  @ApiProperty({ description: '用户信息', required: false })
  @IsOptional()
  @IsString()
  userInfo?: string;

  @ApiProperty({ description: '加密数据', required: false })
  @IsOptional()
  @IsString()
  encryptedData?: string;

  @ApiProperty({ description: '加密算法的初始向量', required: false })
  @IsOptional()
  @IsString()
  iv?: string;
}
